package com.kantboot.business.talent.domain.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

/**
 * 员工系列工作经历
 */
@Entity
@Getter
@Setter
@Table(name = "bus_talent_series_work_experience_of_user_account")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
public class BusTalentSeriesWorkExperienceOfUserAccount implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @LastModifiedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;

    /**
     * 员工ID
     */
    @Column(name = "user_account_id")
    private Long userAccountId;

    /**
     * 系列id
     */
    @Column(name = "series_id")
    private Long seriesId;

    /**
     * 开始时间
     */
    @Column(name = "gmt_start")
    private Date gmtStart;

    /**
     * 结束时间
     */
    @Column(name = "gmt_end")
    private Date gmtEnd;

    /**
     * 是否还在此系列工作
     */
    @Column(name = "is_current")
    private Boolean isCurrent;

}